import {
  Constant_Enum_Enum_Order_PayStatus,
  IConstant_Enum_Type_Order_PayStatus,
  Constant_Enum_Enum_Rebates_RebatesType,
  Constant_Enum_Name_Rebates_RebatesType,
  IConstant_Enum_Type_Rebates_RebatesType,
} from '@/common/constants/enum';
import { Decorator_DtoIsNumber_Base } from '@/common/decorators/dtoIsNumber';
import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsString } from 'class-validator';

export class Rebastes_RebastesStatic_Dto {
  @IsString()
  @IsOptional()
  @ApiProperty({ description: '开始时间', type: 'bigint' })
  startTime?: number;

  @IsString()
  @IsOptional()
  @ApiProperty({ description: '结束时间', type: 'bigint' })
  endTime?: number;
}

export class RebatesWeb_Find_Dto {
  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  size?: number;

  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  page?: number;
}

export class Rebates_OrderListFind_Dto {
  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  size?: number;

  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  page?: number;

  @IsString()
  @IsOptional()
  @ApiProperty({ description: '开始时间', type: 'bigint' })
  startTime?: number;

  @IsString()
  @IsOptional()
  @ApiProperty({ description: '结束时间', type: 'bigint' })
  endTime?: number;

  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  @ApiProperty({ description: '用户id' })
  userClientId?: number;

  @IsString()
  @IsOptional()
  @ApiProperty({ description: '用户名' })
  userName?: string;

  @IsString()
  @IsOptional()
  @ApiProperty({
    description: '到账状态' + Constant_Enum_Name_Rebates_RebatesType,
    enum: Constant_Enum_Enum_Rebates_RebatesType,
  })
  distributionStatus?: IConstant_Enum_Type_Rebates_RebatesType;

  @IsString()
  @IsOptional()
  @ApiProperty({
    enum: Constant_Enum_Enum_Order_PayStatus,
    description: '订单状态',
  })
  status?: IConstant_Enum_Type_Order_PayStatus;
}
